import request from '@/utils/request'

const lessonUrl = '/lesson/'

export function carousel() {
  return request({
    url: lessonUrl + 'carousel/list',
    method: 'GET',
  })
}

export function getInfo(params) {
  const lessonId = params.lessonId
  return request({
    url: lessonUrl + 'info',
    method: 'GET',
    params: {
      lessonId
    }
  })
}

export function getBriefInfo(params) {
  const lessonId = params.lessonId
  return request({
    url: lessonUrl + 'brieInfo',
    method: 'GET',
    params: {
      lessonId
    }
  })
}

export function getByGradeId(params) {
  const gradeId = params.gradeId
  return request({
    url: lessonUrl + 'get/grade',
    method: 'GET',
    params: {
      gradeId
    }
  })
}

export function getSubject() {
  return request({
    url: lessonUrl + 'get/subject',
    method: 'GET',

  })
}

export function lessonList(data) {
  return request({
    url: "/courseLesson/" + 'list',
    method: 'POST',
    data
  })
}


